package kortmann.rene.leo.model;

import kortmann.rene.leo.factories.JsonObjectGet;
import kortmann.rene.leo.factories.JsonObjectSet;

public class LEO extends DbObject
{
	private String id;
	private String status;
	private String nachname;
	private String vorname;
	private String titel;
	private String adel;
	private String geburtsdatum;
	private String email;
	private String tel;
	private String mobil;
	private String adresse;
	private String plz;
    private String ort;
    private String land;
    private String email_g;
    private String tel_g;
    private String mobil_g;
    private String adresse_g;
    private String plz_g;
    private String ort_g;
    private String land_g;
    private String password;
    private String username;
	
	public LEO()
	{
		
	}
	
	@JsonObjectGet(path="status")
	public String getStatus() {
		return status;
	}

	@JsonObjectSet(path="status")
	public void setStatus(String status) {
		this.status = status;
	}

	@JsonObjectGet(path="nachname")
	public String getNachname() {
		return nachname;
	}

	@JsonObjectSet(path="nachname")
	public void setNachname(String nachname) {
		this.nachname = nachname;
	}

	@JsonObjectGet(path="vorname")
	public String getVorname() {
		return vorname;
	}

	@JsonObjectSet(path="vorname")
	public void setVorname(String vorname) {
		this.vorname = vorname;
	}

	@JsonObjectGet(path="titel")
	public String getTitel() {
		return titel;
	}

	@JsonObjectSet(path="titel")
	public void setTitel(String titel) {
		this.titel = titel;
	}

	@JsonObjectGet(path="adel")
	public String getAdel() {
		return adel;
	}

	@JsonObjectSet(path="adel")
	public void setAdel(String adel) {
		this.adel = adel;
	}

	@JsonObjectGet(path="geburtsdatum")
	public String getGeburtsdatum() {
		return geburtsdatum;
	}

	@JsonObjectSet(path="geburtsdatum")
	public void setGeburtsdatum(String geburtsdatum) {
		this.geburtsdatum = geburtsdatum;
	}

	@JsonObjectGet(path="email")
	public String getEmail() {
		return email;
	}
	
	@JsonObjectSet(path="email")
	public void setEmail(String email) {
		this.email = email;
	}

	@JsonObjectGet(path="tel")
	public String getTel() {
		return tel;
	}

	@JsonObjectSet(path="tel")
	public void setTel(String tel) {
		this.tel = tel;
	}

	@JsonObjectGet(path="mobil")
	public String getMobil() {
		return mobil;
	}

	@JsonObjectSet(path="mobil")
	public void setMobil(String mobil) {
		this.mobil = mobil;
	}

	@JsonObjectGet(path="adresse")
	public String getAdresse() {
		return adresse;
	}

	@JsonObjectSet(path="adresse")
	public void setAdresse(String adresse) {
		this.adresse = adresse;
	}

	@JsonObjectGet(path="plz")
	public String getPlz() {
		return plz;
	}

	@JsonObjectSet(path="plz")
	public void setPlz(String plz) {
		this.plz = plz;
	}

	@JsonObjectGet(path="ort")
	public String getOrt() {
		return ort;
	}

	@JsonObjectSet(path="ort")
	public void setOrt(String ort) {
		this.ort = ort;
	}

	@JsonObjectGet(path="land")
	public String getLand() {
		return land;
	}

	@JsonObjectSet(path="land")
	public void setLand(String land) {
		this.land = land;
	}

	@JsonObjectGet(path="email_g")
	public String getEmail_g() {
		return email_g;
	}

	@JsonObjectSet(path="email_g")
	public void setEmail_g(String email_g) {
		this.email_g = email_g;
	}

	@JsonObjectGet(path="tel_g")
	public String getTel_g() {
		return tel_g;
	}

	@JsonObjectSet(path="tel_g")
	public void setTel_g(String tel_g) {
		this.tel_g = tel_g;
	}

	@JsonObjectGet(path="mobil_g")
	public String getMobil_g() {
		return mobil_g;
	}

	@JsonObjectSet(path="mobil_g")
	public void setMobil_g(String mobil_g) {
		this.mobil_g = mobil_g;
	}

	@JsonObjectGet(path="adresse_g")
	public String getAdresse_g() {
		return adresse_g;
	}

	@JsonObjectSet(path="adresse_g")
	public void setAdresse_g(String adresse_g) {
		this.adresse_g = adresse_g;
	}

	@JsonObjectGet(path="plz_g")
	public String getPlz_g() {
		return plz_g;
	}

	@JsonObjectSet(path="plz_g")
	public void setPlz_g(String plz_g) {
		this.plz_g = plz_g;
	}

	@JsonObjectGet(path="ort_g")
	public String getOrt_g() {
		return ort_g;
	}

	@JsonObjectSet(path="ort_g")
	public void setOrt_g(String ort_g) {
		this.ort_g = ort_g;
	}

	@JsonObjectGet(path="land_g")
	public String getLand_g() {
		return land_g;
	}

	@JsonObjectSet(path="land_g")
	public void setLand_g(String land_g) {
		this.land_g = land_g;
	}

	public String getId() {
		return id;
	}

	@JsonObjectSet(path="id")
	public void setId(String id) {
		this.id = id;
	}

	@Override
	public String toString() {
		return "LEO [id=" + id + ", status=" + status + ", nachname="
				+ nachname + ", vorname=" + vorname + ", titel=" + titel
				+ ", adel=" + adel + ", geburtsdatum=" + geburtsdatum
				+ ", email=" + email + ", tel=" + tel + ", mobil=" + mobil
				+ ", adresse=" + adresse + ", plz=" + plz + ", ort=" + ort
				+ ", land=" + land + ", email_g=" + email_g + ", tel_g="
				+ tel_g + ", mobil_g=" + mobil_g + ", adresse_g=" + adresse_g
				+ ", plz_g=" + plz_g + ", ort_g=" + ort_g + ", land_g="
				+ land_g + "]";
	}

	@Override
	public boolean persistentGranted() 
	{
		boolean result = true;
		
		if(this.vorname == null ||
		   this.vorname.length() <= 0)
			result = false;
		
		if(this.nachname == null ||
		   this.nachname.length() <= 0)
			result = false;
		
		return result;
	}

	@JsonObjectGet(path="password")
	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	@JsonObjectGet(path="username")
	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}
}
